<?php
/**
 * @ Fmash Top System
 * @ version: 3.0
 * @ author: i.coffee.smile@mail.com
 * @ date:2011-1-28
 * @ file:upload_check.php $25
 */
 
//检查手机号码是否有效
function checktel($num)
{
	$checktel ='/^1(3|5)\d{9}$/';
	if(preg_match($checktel,$num))
	{
		return $num;
	}else{
		$message = '请检查您输入的电话号码是否正确！';
		$message = rawurlencode($message);
		header("location:upload_error.php?error=$message");
		exit();
	}
}

function checkqq($qq)
{
	$checkqq = '/^[1-9]\d{4,9}$/';
	 if(preg_match($checkqq,$qq))
	 {
	 	return $qq;
	 }else{
		 $message = '请检查您输入的QQ号是否正确！';
		$message = rawurlencode($message);
		header("location:upload_error.php?error=$message");
		exit();
	 }
}
